package priv.pront.code.lanqiao.competition.course.date0330;

import java.util.Scanner;

public class 天干地支 {
    static String[] tian = {"jia", "yi", "bing", "ding", "wu", "ji", "geng", "xin", "ren", "kui"};
    static String[] di = {"zi", "chou", "yin", "mao", "chen", "si", "wu", "wei", "shen", "you", "xu", "hai"};

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int tianIndex = 6;
        int diIndex = 0;
        int i = 2020;
        if(n == i){
            System.out.println(tian[tianIndex] + di[diIndex]);
        } else if (n > i) {
            for (int j = 2021; j <= n; j++) {
                tianIndex++;
                diIndex++;
                if(tianIndex == 10){
                    tianIndex = 0;
                }
                if(diIndex == 12){
                    diIndex = 0;
                }
            }
            System.out.println(tian[tianIndex] + di[diIndex]);
        }else{
            for (int j = 2019; j >=n; j--) {
                tianIndex--;
                diIndex--;
                if(tianIndex == -1){
                    tianIndex = 9;
                }
                if(diIndex == -1){
                    diIndex = 11;
                }
            }
            System.out.println(tian[tianIndex] + di[diIndex]);
        }

    }
}
